import request from '@/utils/request'

// 查询列表
export function listRecycle(query) {
  return request({
    url: '/recycle/list',
    method: 'get',
    params: query
  })
}

// 查询详细
export function getRecycle(recycleId) {
  return request({
    url: '/recycle/' + recycleId,
    method: 'get'
  })
}

// 新增
export function addRecycle(data) {
  return request({
    url: '/recycle',
    method: 'post',
    data: data
  })
}

// 修改
export function updateRecycle(data) {
  return request({
    url: '/recycle',
    method: 'put',
    data: data
  })
}

// 删除
export function delRecycle(recycleId) {
  return request({
    url: '/recycle/' + recycleId,
    method: 'delete'
  })
}
// 完成交易
export function complete(data) {
  return request({
    url: '/recycle/complete',
    method: 'post',
    data
  })
}
// 转问题
export function transferToIssue(data) {
  return request({
    url: '/recycle/transferToIssue',
    method: 'post',
    data
  })
}

// 取消订单
export function cancelTheOrder(data) {
  return request({
    url: '/recycle/cancelTheOrder',
    method: 'post',
    data
  })
}
//查询换绑信息
export function pulsTopicPhone(id){
  return request({
    url: `/recycle/pulstopicphone/${id}`,
    method: 'get',
  })
}
//输入验证码
export function getValidate(data){
  return request({
    url: "/recycle/getValidate",
    method: 'post',
    data
  })
}
